<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  
  <title>3-lunch启动文件及可视化 | ChenBlue | 飞雪连天射白鹿 笑书神侠倚碧鸳</title>

  
  <meta name="author" content="ChenBlue">
  

  
  <meta name="description" content="学习笔记">
  

  
  
  <meta name="keywords" content="ROS">
  

  <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">

  <meta property="og:title" content="3-lunch启动文件及可视化"/>

  <meta property="og:site_name" content="ChenBlue"/>

  
  <meta property="og:image" content="/blog/favicon.ico"/>
  

  <link href="/blog/favicon.ico" rel="icon">
  <link rel="alternate" href="/blog/atom.xml" title="ChenBlue" type="application/atom+xml">
  <link rel="stylesheet" href="/blog/css/style.css" media="screen" type="text/css">
<meta name="generator" content="Hexo 5.4.0"></head>


<body>
<div class="blog">
  <div class="content">

    <header>
  <div class="site-branding">
    <h1 class="site-title">
      <a href="/blog/">ChenBlue</a>
    </h1>
    <p class="site-description">飞雪连天射白鹿 笑书神侠倚碧鸳</p>
  </div>
  <nav class="site-navigation">
    <ul>
      
    </ul>
  </nav>
</header>

    <main class="site-main posts-loop">
    <article>

  
    
    <h3 class="article-title"><span>3-lunch启动文件及可视化</span></h3>
    
  

  <div class="article-top-meta">
    <span class="posted-on">
      <a href="/blog/2021/04/12/3-lunch启动文件及可视化/" rel="bookmark">
        <time class="entry-date published" datetime="2021-04-12T12:39:03.000Z">
          2021-04-12
        </time>
      </a>
    </span>
  </div>


  

  <div class="article-content">
    <div class="entry">
      
        <h1 id="launch-启动文件"><a href="#launch-启动文件" class="headerlink" title="launch 启动文件"></a>launch 启动文件</h1><p>为什么要启动文件？</p>
<p>launch 文件启动会自动检测是否启动了 roscore 同时还可以带入某些参数</p>
<pre class="language-html" data-language="html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>launch</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>node</span> <span class="token attr-name">pkg</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>learning_communication<span class="token punctuation">"</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>person_subscriber<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>talker<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>node</span> <span class="token attr-name">pkg</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>learning_communication<span class="token punctuation">"</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>person_subscriber<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>talker<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
&lt;/ launch></code></pre>
<blockquote>
<p>pkg : 功能包名</p>
<p>type：可执行文件名</p>
<p>name：执行时节点名</p>
</blockquote>
<h1 id="TF-坐标变换"><a href="#TF-坐标变换" class="headerlink" title="TF 坐标变换"></a>TF 坐标变换</h1><pre class="language-none"><code class="language-none">sudo apt-get install ros-melodic-turtle-tf
roslaunch turtle_tf turtle_tf_demo.launch
rosrun turtlesim turtle_teleop_key
rosrun tf view_frames</code></pre>

<p>命令行工具</p>
<pre class="language-none"><code class="language-none">tf tf_echo turtle1 turtle2</code></pre>
<p>可视化工具</p>
<pre class="language-none"><code class="language-none">rosrun rviz rviz -d &#96;rospack find turtle_tf&#96;&#x2F;rviz&#x2F;turtle_rviz.rviz</code></pre>
<p><a target="_blank" rel="noopener" href="https://www.icode9.com/content-1-654811.html">TF坐标变换</a></p>
<p><a href>实现广播器和监听器</a></p>
<h1 id="可视化"><a href="#可视化" class="headerlink" title="可视化"></a>可视化</h1><table>
<thead>
<tr>
<th align="center">可视化工具</th>
<th align="center">指令</th>
</tr>
</thead>
<tbody><tr>
<td align="center">日志输出工具</td>
<td align="center">rqt_console</td>
</tr>
<tr>
<td align="center">计算图可视化工具</td>
<td align="center">rqt_graph</td>
</tr>
<tr>
<td align="center">数据绘图工具</td>
<td align="center">rqt_plot</td>
</tr>
<tr>
<td align="center">图像渲染工具</td>
<td align="center">rqt_image_view</td>
</tr>
</tbody></table>
<h1 id="gazebo"><a href="#gazebo" class="headerlink" title="gazebo"></a>gazebo</h1><p>为保证模型顺利加载，请提前将模型文件库下载并放置到~/.gazebo/models下</p>
<p><a target="_blank" rel="noopener" href="https://bitbucket.org/osrf/gazebo_models/downloads/">gazbeo 模型下载地址</a></p>
<pre class="language-none"><code class="language-none">roslaunch gazebo_ros mud_world.launch</code></pre>




      
    </div>

  </div>

  <div class="article-footer">
    <div class="article-meta pull-left">

    
      

    <span class="post-categories">
      <i class="icon-categories"></i>
        <a href="/blog/categories/ROS-学习笔记/">ROS 学习笔记</a>
    </span>
    

    
    

    <span class="post-tags">
      <i class="icon-tags"></i>
        <a href="/blog/tags/ROS/">ROS</a>
    </span>
    

    </div>

    
  </div>
</article>

  









    </main>

    <footer class="site-footer">
  <p class="site-info">
    Proudly powered by <a href="https://hexo.io/" target="_blank">Hexo</a> and
    Theme by <a href="https://github.com/CodeDaraW/Hacker" target="_blank">Hacker</a>
    </br>
    
    &copy; 2023 ChenBlue
    
  </p>
</footer>
    
    
  </div>
</div>
</body>
</html>